package wfmanage.action;

import java.util.List;
import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

import edu.wfmanage.models.Claim;
import edu.wfmanage.models.User;

public class verificationHistory extends ActionSupport {
private String username;
	private List<Claim> verifyHistory;
	public String execute() throws Exception {
		Map<String, Object> session = ActionContext.getContext().getSession();
		User user = (User) session.get("user");
		if (user == null) {
			user = new User();
		}		
		String sql="select * from request where (VERIFY_DPT_STATUS ='VerificationPassed' or VERIFY_DPT_STATUS ='VerificationFailed') and VERIFIED_BY='"+user.getUsername() +"'";
		verifyHistory=Claim.getHistory(sql);
		return "seeHistory";
	}
	public List<Claim> getVerifyHistory() {
		return verifyHistory;
	}
	public void setVerifyHistory(List<Claim> verifyHistory) {
		this.verifyHistory = verifyHistory;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	
	
}
